package com.example.demo.zabbix.request.builder.valuemap;

import com.example.demo.zabbix.request.BaseRequest;
import com.example.demo.zabbix.request.builder.request.UpdateRequestBuilder;

import java.util.Map;

/**
 * https://www.zabbix.com/documentation/4.0/manual/api/reference/valuemap/update
 */
public class ValueMapUpdateRequestBuilder extends UpdateRequestBuilder {
    private String valuemapId;
    public ValueMapUpdateRequestBuilder( String auth) {
        super("valuemap.update", auth);
    }

    public ValueMapUpdateRequestBuilder( Long id, String auth) {
        super("valuemap.update", id, auth);
    }

    public String getValuemapId() {
        return valuemapId;
    }

    public ValueMapUpdateRequestBuilder setValuemapId(String valuemapId) {
        this.valuemapId = valuemapId;
        return this;
    }

    @Override
    public BaseRequest<Map<String, Object>> builder() {
        baseRequest.getParams().put("valuemapid",valuemapId);
        return baseRequest;
    }
}
